package com.feishi.core.util.common;



import org.jaudiotagger.audio.AudioFile;
import org.jaudiotagger.audio.AudioFileIO;
import org.jaudiotagger.audio.AudioHeader;

import java.io.File;

public class WavUtil {
    public static void main(String[] args) {
//        复制代码
        File file = new File("/home/caixq/Music/CloudMusic/呦猫UNEKO - 梦回还.mp3");
        try {
            AudioFile f = AudioFileIO.read(file);
            AudioHeader audioHeader = f.getAudioHeader();
            System.out.println(audioHeader.getTrackLength());
        } catch(Exception e) {
            e.printStackTrace();
        }
    }
}
